package com.cunzhang.pojo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Orders {

    /**
     * 订单状态
     * 1待付款 2待接单 3已接单 4派送中 5已送达 6已取消
     */
    private static final Integer PENDING_PAYMENT = 1;
    private static final Integer TO_BE_CONFIRMED = 2;
    private static final Integer CONFIRMED = 3;
    private static final Integer DELIVERY_IN_PROGRESS = 4;
    private static final Integer COMPLETED = 5;
    private static final Integer CANCELLED = 6;

    /**
     * 支付状态
     * 0未支付 1已支付 2退款
     */
    private static final Integer UN_PAID = 0;
    private static final Integer PAID = 1;
    private static final Integer REFUND = 2;


    private Long id;
    private String number;
    private Integer status;
    private Long userId;
    private Long addressBookId;
    private LocalDateTime orderTime;
    private LocalDateTime checkoutTime;
    private Integer payMethod;
    private Integer payStatus;
    private BigDecimal amount;
    private String remark;
    private String phone;
    private String address;
    private String userName;
    private String consignee;
    private String cancelReason;
    private String rejectionReason;
    private LocalDateTime cancelTime;
    private LocalDateTime estimatedDeliveryTime;
    private Integer deliveryStatus;
    private LocalDateTime deliveryTime;
    private Integer packAmount;
    private Integer tablewareNumber;
    private Integer tablewareStatus;
}
